<Window x:Class="FluidKit.Showcase.DragDrop.PanelExample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="PanelExample - FluidKit" Height="400" Width="400"
    xmlns:local="clr-namespace:FluidKit.Showcase.DragDrop"
    xmlns:DragDrop="clr-namespace:FluidKit.Helpers.DragDrop;assembly=FluidKit"
    >
  <Window.Resources>
    <ResourceDictionary>
      <local:DefaultDragSourceAdvisor x:Key="sourceAdvisor1"/>
      <local:DefaultDragSourceAdvisor x:Key="sourceAdvisor2"/>
      <local:DefaultDragSourceAdvisor x:Key="sourceAdvisor3"/>

      <local:DefaultDropTargetAdvisor x:Key="targetAdvisor1"/>
      <local:DefaultDropTargetAdvisor x:Key="targetAdvisor2"/>
      <local:DefaultDropTargetAdvisor x:Key="targetAdvisor3"/>

      <Style TargetType="{x:Type Button}">
        <Setter Property="Width" Value="50"/>
        <Setter Property="Height" Value="60"/>
        <Setter Property="Margin" Value="3"/>
      </Style>
    </ResourceDictionary>
  </Window.Resources>
  <Grid x:Name="_mainGrid">
    <Grid.ColumnDefinitions>
      <ColumnDefinition/>
      <ColumnDefinition/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition/>
      <RowDefinition/>
    </Grid.RowDefinitions>

    <Border Grid.Row="0" Grid.Column="0" BorderBrush="Black" BorderThickness="2" CornerRadius="8">
      <WrapPanel x:Name="_topPanel" Background="White"
                   DragDrop:DragDropManager.DropTargetAdvisor="{StaticResource targetAdvisor1}"
                     >
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
      </WrapPanel>
    </Border>

    <Border Grid.Row="0" Grid.Column="1" BorderBrush="Green" BorderThickness="2" CornerRadius="8">
      <WrapPanel Background="White" 
                 DragDrop:DragDropManager.DragSourceAdvisor="{StaticResource sourceAdvisor2}"
                     >
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
        <Button Content="Top"/>
      </WrapPanel>
    </Border>

    <Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="Red" BorderThickness="2" CornerRadius="8"
              >
      <WrapPanel x:Name="_bottomPanel" Background="White"
                 DragDrop:DragDropManager.DragSourceAdvisor="{StaticResource sourceAdvisor3}"
                   DragDrop:DragDropManager.DropTargetAdvisor="{StaticResource targetAdvisor2}"
                   >
        <Button Content="Bottom"/>
        <Button Content="Bottom"/>
        <Button Content="Bottom"/>
        <Button Content="Bottom"/>
        <Button Content="Bottom"/>
        <Button Content="Bottom"/>
        <Button Content="Bottom"/>
      </WrapPanel>
    </Border>
  </Grid>
</Window>
